package repository

import (
	"context"

	"github.com/devops-smartbot/devops-smartbot/services/ticket-service/internal/model"
)

// Repository defines persistence behaviour for tickets.
type Repository interface {
	ListTickets(ctx context.Context, filter Filter) ([]model.Ticket, int64, error)
	GetTicket(ctx context.Context, id string) (*model.Ticket, error)
	CreateTicket(ctx context.Context, ticket *model.Ticket) error
	UpdateTicket(ctx context.Context, ticket *model.Ticket) error
}

// Filter captures query parameters for listing tickets.
type Filter struct {
	Status   []string
	Priority []string
	Limit    int64
	Offset   int64
}
